#ifndef GEOMETRY_TYPES_H
#define GEOMETRY_TYPES_H

#include <string>
#include <vector>
#include <map>
#include <memory>
#include <cmath>
#include <any>

struct Point {
    double x, y;
    Point(double x = 0, double y = 0) : x(x), y(y) {}
    
    bool operator==(const Point& other) const {
        return std::abs(x - other.x) < 1e-10 && std::abs(y - other.y) < 1e-10;
    }
};

struct Line {
    std::string type;
    std::vector<std::string> points;
    double x; // 对于垂直线
    std::string description;
};

struct Circle {
    Point center;
    double radius;
};

struct Segment {
    std::vector<std::string> points;
    double length;
    std::vector<Point> coordinates;
};

// 策略数据结构
struct Strategy {
    std::vector<std::string> elementIdentifier;
    std::string strategy;
};

// 分析结果
struct AnalysisResult {
    std::string operationType;
    std::string calculationMethod;
    std::map<std::string, std::any> parameters;
    std::vector<std::string> requiredElements;
    int executionOrder;
};

// 几何状态
struct GeometryState {
    std::map<std::string, Point> points;
    std::map<std::string, Line> lines;
    std::map<std::string, Circle> circles;
    std::map<std::string, Segment> segments;
};

// 执行结果
struct ExecutionResult {
    bool success;
    std::map<std::string, Point> points;
    std::map<std::string, Line> lines;
    std::map<std::string, Circle> circles;
    std::map<std::string, Segment> segments;
    std::string message;
};

#endif